<%-- 
    Document   : user-manage
    Created on : Feb 9, 2012, 8:24:39 AM
    Author     : PhucAn
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../handler/manage-user-action.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>User management</title>
    </head>
    <body>
        <form action="#" method="post">
            <table class="data-table">
                <tr>
                    <th>Username</th>
                    <th>Full name</th>
                    <th>Email</th>
                    <th>Date of birth</th>
                    <th>Role</th>
                    <th></th>

                </tr>
                <c:if test="${list==null}">
                    <c:out value="There is no account"/>
                </c:if>
                <c:forEach items="${list}" var="u" >
                    <tr>
                        <td>${u.username}</td>
                        <td>${u.firstName} ${u.lastName}</td>
                        <td>${u.email}</td>
                        <td>${u.dateOfBirth}</td>
                        <td>${u.role==1?"administrator":(u.role==2?"Teacher":"Student")}</td>
                        <td>
                            <a href="?pcontent=profile?id=${u.id}">Details</a> 
                            <a href="javascript:showConfirm();">Delete</a>
                        </td>

                    </tr>
                </c:forEach>
            </table>
            <div class="confirm-box">
                <div>Are you sure want to continue?</div>
                <input type="submit" name="delete" value="Delete"/>
                <input type="button" name="hide" value="Hide" onclick="hideConfirm();"/>
            </div>
        </form>
        <div id="paging-bar"><%=pagingBar%></div>
    </body>
</html>
